package cn.edu.fzu.delivery.domain.enums;

/**
 * @author jiebin
 * @data 2022/11/13
 **/
public enum NetWorkTypeEnum implements SpringConvertibleEnum {

    NON_DESTINATION(0, "非目的网点"),
    DESTINATION(1, "目的网点");

    private final int    value;

    private final String desc;

    private NetWorkTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static NetWorkTypeEnum parse(int value) {
        switch (value) {
            case 0:
                return NON_DESTINATION;
            case 1:
                return DESTINATION;
            default:
                return null;
        }
    }


    @Override
    public String toString() {
        return String.valueOf(getValue());
    }
}
